#include "junix.h"
using namespace std;

struct A
{
	int i;
	int j;

	A(int ii=0,int jj=0):i(ii),j(jj){ }
    void print_i()
    {
    	cout<<i<<" ";
    }

    void print_j()
    {
    	cout<<j<<" ";
    }

    int geti(){ return i;}
    int getj(){ return j;}
};

int main(int argc, char **argv)
{
	srand( time(0));
	vector<int> vi(20);
	generate(vi.begin(),vi.end(),
			boost::bind( modulus<int>(),
				boost::bind(rand), 20));
	vector<int> vp;
	vp.push_back(5);

	ostream_iterator<int> oit(cout, " ");
	copy(vi.begin(),vi.end(),oit);
	cout<<endl;

	vector<int>::iterator p;
	p=find_end(vi.begin(),vi.end(),
			vp.begin(),vp.end());

	copy(p,vi.end(),oit);
	cout<<endl;
}
